home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 003.dms / 003.adf / TEXT / chapter2.txt < prev    next >
Text File  |  1992-09-02  |  2KB  |  61 lines

  1.  
  2.               The Absolute Beginners Guide To Amos
  3.               -------------------------------------
  4.                          Chapter Two
  5.                          -----------
  6.  
  7. Before we continue on to more commands there are a few things I would like
  8. to explain.
  9.  
  10. The program in EXAMPLE1.Amos used seven lines for the actual code as we
  11. should now understand these commands it would be nice to squash them all
  12. up on one line.  We can do this easily by using a colon (:) between each
  13. command like this:
  14.  
  15. CURS OFF: HIDE: PAPER 0: CLS 0: PRINT "Testing...": WAIT KEY: EDIT
  16.  
  17. This will work exactly the same as the program in Example1.Amos.
  18.  
  19. Something else you will come across in Example2.Amos is REM
  20. REM tells Amos not to bother about the rest of that particular line
  21. For example:
  22.  
  23.            REM I can put want I want here with no worries
  24.  
  25. You can even use REM at the end of a line of instructions like this:
  26.  
  27.                 CURS OFF: REM wibble wibble rhubarb
  28.  
  29. But you cannot do this:
  30.  
  31.                      CURS OFF: REM CLS 0
  32.  
  33. Well you can do it, but Amos will never execute the Cls 0 command.
  34.  
  35.  
  36.  
  37. If you are not impressed with REM then you can use ` instead
  38.  
  39.          ` I can put anything I want here with no worries
  40.  
  41. But you cannot use an apostrophe like this
  42.  
  43.              CURS OFF ` this will cause a syntax error
  44.  
  45.   
  46. What you may ask is all the fuss about REM and ` as they don`t seem to do a
  47. lot? Well just observe my program comments in the examples and it will be
  48. clear how useful commenting a program can be, especially in complex programs
  49. where you have to keep track of lots of variables, ha! that is a nice link 
  50. to chapter three where we learn about variables amongst other mysterious
  51. things. 
  52.  
  53. Time to LOAD up EXAMPLE2.Amos and mess around with the listing.
  54. Don`t forget to make notes on everything you learn.
  55.  
  56.  
  57. End of chapter two.
  58.  
  59.  
  60.   
  61.